<!--
 * @Authoer: hujun
 * @Description:用户授权机构管理
 * @Date 2017/12/27 14:16
 * @Modified By:
 *
-->

<div id="userGrantOrg">
    <el-form-q form="query" :field-data="queryFields" :buttons="queryButtons"></el-form-q>
    <div class="yu-toolBar">
        <el-button-group>
            <el-button icon="add" @click="openCreateFn">{{ $t('userGrantOrgManager.xz') }}</el-button>
            <el-button icon="edit" @click="openEditFn">{{ $t('userGrantOrgManager.xg') }}</el-button>
            <el-button icon="delete" @click="deletestFn">{{ $t('userGrantOrgManager.sc') }}</el-button>
            <el-button icon="edit" @click="useFn">{{ $t('userGrantOrgManager.qy') }}</el-button>
            <el-button icon="edit" @click="unUseFn">{{ $t('userGrantOrgManager.ty') }}</el-button>
        </el-button-group>
    </div>
    <el-table-x ref="grantTable" :checkbox="mainGrid.checkbox" :max-height="mainGrid.height" :data-url="mainGrid.dataUrl" :data-params="mainGrid.dataParams"
        :table-columns="mainGrid.tableColumns" @custom-detail-click="openDetailFn">
    </el-table-x>
    <el-dialog-x :center="true" :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" center=true height="200px">
        <el-form-x ref="grantInfoform" :group-fields="updateFields" :disabled="formDisabled" label-width="80px"></el-form-x>
        <div align="center">
            <el-button @click="dialogFormVisible = false">{{ $t('userGrantOrgManager.gb') }}</el-button>
            <el-button v-if="dialogStatus=='create'" type="primary" @click="saveCreateFn()">{{ $t('userGrantOrgManager.qd') }}</el-button>
            <el-button v-if="dialogStatus=='update'" type="primary" @click="saveEditFn()">{{ $t('userGrantOrgManager.qd') }}</el-button>
        </div>
    </el-dialog-x>
</div>